package com.woniu.service.impl;


import com.woniu.dao.UserDao;
import com.woniu.entity.User;
import com.woniu.service.UserService;

import java.util.List;

/**
 * User业务层实现类
 */

public class UserServiceImpl implements UserService {

    private UserDao userDao;

    public void setUserDao(UserDao userDao) {
        this.userDao = userDao;
    }

    @Override
    public User findOne(int id) {
        return userDao.findOne(id);
    }

    @Override
    public List<User> findAll() {
        return userDao.findAll();
    }

    @Override
    public int addOne(User user) {
        return userDao.addOne(user);
    }

    @Override
    public int updateOne(User user) {
        return userDao.updateOne(user);
    }

    @Override
    public int deleteOne(int id) {
        return userDao.deleteOne(id);
    }
}
